<div id="bluecoat-list">
  <h1>Categories</h1>

  <table cellpadding="5" cellspacing="0">
    <% for category in @categories %>
      <tr class="<%= cycle('list-line-odd', 'list-line-even') %>">
        <td class="list-title">
          <%= link_to image_tag('/images/trash.gif', :title => 'Trash' ), { :action => :destroy, :id => category },
                             :method => :post %>
        </td>
        <td>
          <span  class="list-title">
            <%= link_to h(category.name), :action => :edit, :id => category %>
          </span><br/>
          <%= h(category.description) %>
        </td>
        <td>
          <% if @all_categories.size > 1 %>
            <% form_tag :action => :move_urls, :id => category do %>
              <%= submit_tag "Move" %> URLs to category:
              <select name="new_category">
                <%= options_from_collection_for_select(@all_categories-[category], :id, :name) %>
              </select>
            <% end %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </table>
  <hr/>

<%= will_paginate @categories %>
  <hr/>
</div>
